<div class="mt20 clearfix ng-scope ml25">
    <button href="javascript:;" class="btn fr" ng-if="contractBaseInfo.contract_status == 0 && contractBaseInfo.is_cancelled == 0"
        ng-click="add()">
        新增产品
    </button>
</div>
<div id="grid" class="table-wrap mt10 ml25" style="min-height: 200px;">

    <table width="100%">
        <thead>
            <tr>
                <th width="40">序号</th>
                <th width="100">产品名称</th>
                <th width="170" class="align-r">标准单价(每项目、每年)</th>
                <th width="175" class="align-m">产品数/短信条数</th>
                <th width="90" class="align-r">租用周期(月)</th>
                <th width="110" class="align-r">标准总额</th>
                <th width="110" class="align-r">合同属性</th>
                <th width="110" class="align-r">已出数目</th>
                <th width="110" class="align-r">状态</th>
                <th width="108" class="align-m">操作</th>
            </tr>
        </thead>
        <tbody>
            <tr ng-repeat="project in projects" ng-if="project.__type != 'delete'">
                <td height="40">
                    <p ng-bind="$index + 1"></p>
                </td>
                <td class="lh14">
                    <p ng-bind="project.application_name" class="lh24"></p>
                </td>
                <td class="align-r">
                    <p ng-if="project.authorization_type == 0">{{project.price|number:2}}</p>

                    <p ng-if="project.authorization_type == 1">{{project.unit||(project.price|number:2)}}</p>
                </td>
                <td class="align-m">
                    <p ng-if="project.authorization_type == 0">产品数:{{project.authorization_numeric}}</p>

                    <p ng-if="project.authorization_type == 1">短信数:{{project.authorization_numeric}}</p>
                </td>
                <td class="align-r">
                    <p ng-bind="project.rent_period | number"></p>
                </td>
                <td class="align-r">
                    <p ng-bind="project.amount | number:2"></p>
                </td>
                <td class="align-r">
                    <p ng-bind="project.contract_type | getContractTypeName"></p>
                </td>
                <td class="align-r">
                    {{project.alreadyOutNum}}
                </td>
                <td class="align-r" ng-class="project.status === '超额' ? 'c-red' : ''">
                    {{project.status}}
                </td>
                <td class="align-m">
                    <div ng-if="userAuthList.indexOf('0001') !== -1">
                        <a href="javascript:;" ng-if="showEdit(contractBaseInfo)" ng-click="update(project)">
                            修改
                        </a>
                        <a href="javascript:;" ng-if="contractBaseInfo.contract_status != 0" ng-click="view(project)">
                            查看
                        </a>
                        <a href="javascript:void(0)" ng-click="delProject(project)" title="删除产品" ng-if="contractBaseInfo.contract_status == 0">
                            删除
                        </a>
                    </div>
                </td>
            </tr>
        </tbody>
    </table>
    <div class="no-data" style="display:none"><span>暂无数据</span></div>

</div>
<div class="ml25 mt10">
    <span class="pl10">产品数合计：{{projects|countProject|number}}个产品</span>
    <span class="pl10">产品标准总额合计：{{projects|sumProductAmount|number}}元</span>
    <span class="pl10">短信条数合计：{{projects|countSMS|number}}条</span>
</div>